<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import OnlineStatusEnum from '@/framework/constant/OnlineStatusEnum'
import {tagApi} from '@/feature/ag/infra/api/tagApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: {CURDTable},
  data() {
    return {
      option: {
        requestApi: tagApi,
        dialogWidth: "500px",
        // loadDetail: true,
        showSelection: true,
        columns: [
          {
            label: '标签名称',
            searchable: true,
            span: 24,
            width: 'auto',
            required: true,
            prop: 'tagName'
          },
          {
            label: '标签封面',
            prop: 'tagCover',
            type: ColumnType.IMAGE
          },
          {
            label: '状态',
            searchable: true,
            type: ColumnType.RADIO,
            width: 80,
            hiddenInForm: true,
            options: OnlineStatusEnum,
            prop: 'status'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          },
          {
            label: '排序号',
            span: 24,
            required: true,
            width: 80,
            defaultValue: 0,
            prop: 'sortNum',
            type: ColumnType.NUMBER
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

